#include<stdio.h>
#if 0
int main() {
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int* p = arr;
	int i = 0;
	for (i = 0; i < 10; i++) {
		printf("%d ", *p);
		p++;
	}
	return 0;
}
#endif

#if 0
int main() {
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int(*p)[10] = &arr;
	int i = 0;
	for (i = 0; i < 10; i++) {
		printf("%d ", (*p)[i]);
	}
	return 0;
}
#endif

//
//	int i = 0;
//		for (i = 0; i < r; i++) {
//			int j = 0;
//			for (j = 0; j < c; j++) {
//				printf("%d ", arr[i][j]);
//			}
//			printf("\n");
//		}
//}

void print(int arr[3][5], int r, int c) {
	int i = 0;
	for (i = 0; i < r; i++) {
		int j = 0;
		for (j = 0; j < c; j++) {
			printf("%d ",*(*(arr + i) + j));//arr[i]
		}
		printf("\n");
	}

}
int main() {
	int arr[3][5] = { {1,2,3,4,5},{2,3,4,5,6},{3,4,5,6,7} };
	print(arr, 3, 5);
	return 0;
}

